import 'package:flutter/material.dart';

class Mode1 extends StatefulWidget {
  const Mode1({super.key});

  @override
  // ignore: library_private_types_in_public_api
  _Mode1State createState() => _Mode1State();
}

class _Mode1State extends State<Mode1> {
  List<Map> list = [
    {
      'title': '我的房屋',
      'image': 'assets/images/house_nav_icon@2x.png',
    },
    {
      'title': '在线报修',
      'image': 'assets/images/repair_nav_icon@2x.png',
    },
    {
      'title': '访客邀请',
      'image': 'assets/images/visitor_nav_icon@2x.png',
    },
  ];
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.all(10),
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10),
      ),
      width: double.infinity,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: list
            .map((e) => Column(
                  children: [
                    Image.asset(e['image'], width: 20, height: 20),
                    Text(e['title']),
                  ],
                ))
            .toList(),
      ),
    );
  }
}
